package com.touna.mock;

import java.util.List;
import static org.mockito.Mockito.*;

/**
 * author: xl
 * time: 2018/6/22 16:57
 * description:
 **/
public class MockHelloWorld {


    public static void main(String[] args) {

        // mock creation
        List mockedList = mock(List.class);

// using mock object - it does not throw any "unexpected interaction" exception
        mockedList.add("one");
        mockedList.clear();

// selective, explicit, highly readable verification
        verify(mockedList).add("one");
        verify(mockedList).clear();




    }






}
